Optimal. Leaf size=20 \[ a x-\frac{b \cot (c+d x)}{d}-b x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0125953, antiderivative size = 20, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {3473, 8} \[ a x-\frac{b \cot (c+d x)}{d}-b x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3473
Rule 8
Rubi steps
\begin{align*} \int \left (a+b \cot ^2(c+d x)\right ) \, dx &=a x+b \int \cot ^2(c+d x) \, dx\\ &=a x-\frac{b \cot (c+d x)}{d}-b \int 1 \, dx\\ &=a x-b x-\frac{b \cot (c+d x)}{d}\\ \end{align*}
Mathematica [C] time = 0.0224386, size = 34, normalized size = 1.7 \[ a x-\frac{b \cot (c+d x) \text{Hypergeometric2F1}\left (-\frac{1}{2},1,\frac{1}{2},-\tan ^2(c+d x)\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.004, size = 31, normalized size = 1.6 \begin{align*} ax+{\frac{b}{d} \left ( -\cot \left ( dx+c \right ) +{\frac{\pi }{2}}-{\rm arccot} \left (\cot \left ( dx+c \right ) \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.46544, size = 31, normalized size = 1.55 \begin{align*} a x - \frac{{\left (d x + c + \frac{1}{\tan \left (d x + c\right )}\right )} b}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.12406, size = 105, normalized size = 5.25 \begin{align*} \frac{{\left (a - b\right )} d x \sin \left (2 \, d x + 2 \, c\right ) - b \cos \left (2 \, d x + 2 \, c\right ) - b}{d \sin \left (2 \, d x + 2 \, c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.14367, size = 22, normalized size = 1.1 \begin{align*} a x + b \left (\begin{cases} - x - \frac{\cot{\left (c + d x \right )}}{d} & \text{for}\: d \neq 0 \\x \cot ^{2}{\left (c \right )} & \text{otherwise} \end{cases}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.21556, size = 54, normalized size = 2.7 \begin{align*} a x - \frac{{\left (2 \, d x + 2 \, c + \frac{1}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )} - \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )} b}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]